<!-- thanh toolbar -->
<?php $this->placeholder('toolbar')->captureStart();?>
<?php echo $this->partial('index/toolbar/save-order.phtml', 'admin') ?>
<?php echo $this->partial('index/toolbar/divider.phtml', 'admin') ?>
<?php echo $this->partial('index/toolbar/publish.phtml', 'admin') ?>
<?php echo $this->partial('index/toolbar/unpublish.phtml', 'admin') ?>
<?php echo $this->partial('index/toolbar/divider.phtml', 'admin') ?>
<?php echo $this->partial('index/toolbar/new.phtml', 'admin', array($this->url(array('action' => 'insert')))) ?>
<?php echo $this->partial('index/toolbar/edit.phtml', 'admin', array($this->url(array('action' => 'update')))) ?>
<?php echo $this->partial('index/toolbar/divider.phtml', 'admin') ?>
<?php echo $this->partial('index/toolbar/trash.phtml', 'admin', array($this->url(array('action' => 'delete')))) ?>
<?php $this->placeholder('toolbar')->captureEnd();?>
<!-- / --> 

<form id='adminForm' name='adminForm' method='post' action=''>

	<!-- phần tìm kiếm -->
	<fieldset id='filter-bar' style='height: auto'>
		<?php echo $this->partial('index/search/layout.phtml', 'admin',array (  	
			 $this->partial('index/search/search.phtml', 'admin',array('label'=>$this->captions,'value'=>$this->warehouse_code,'name'=>'warehouse_code')),
			 $this->partial('index/search/search.phtml', 'admin',array('label'=>$this->captions,'value'=>$this->warehouse_name,'name'=>'warehouse_name')),
			 $this->partial('index/search/submit.phtml', 'admin') 
		 )); ?>
		<?php echo $this->partial('index/filter/layout.phtml', 'admin',array (		
			$this->partial('index/filter/publish.phtml', 'admin',array('name'=>'warehouse_status','value'=>$this->warehouse_status)) 
		 )); ?>		 
	</fieldset>	
	<!-- / -->
	
	<!-- danh sách hiển thị -->
	<div class='clr'> </div>
	<table class='adminlist'>
		<thead>			
			<tr>
				<?php echo $this->partial('index/manage/save-order.phtml', 'admin', array('column'=>'warehouse_order')); ?>
				<?php echo $this->partial('index/manage/checkbox-all.phtml', 'admin'); ?>				
				<th>
					<?php echo $this->partial('index/manage/header.phtml','admin',array('caption'=>$this->captions,'column'=>'warehouse_code')); ?>
				</th>
				<th>
					<?php echo $this->partial('index/manage/header.phtml','admin',array('caption'=>$this->captions,'column'=>'warehouse_name')); ?>
				</th>
				<th>
					<?php echo $this->partial('index/manage/header.phtml','admin',array('caption'=>$this->captions,'column'=>'warehouse_address')); ?>
				</th>
				
				<th>
					<?php echo $this->partial('index/manage/header.phtml','admin',array('caption'=>$this->captions,'column'=>'warehouse_phone')); ?>
				</th>
				
				<th>
					<?php echo $this->partial('index/manage/header.phtml','admin',array('caption'=>$this->captions,'column'=>'warehouse_area')); ?>
				</th>
				
				<th>
					<?php echo $this->partial('index/manage/header.phtml','admin',array('caption'=>$this->captions,'column'=>'warehouse_temperature')); ?>
				</th>
				
				<th>
					<?php echo $this->partial('index/manage/header.phtml','admin',array('caption'=>$this->captions,'column'=>'warehouse_contain')); ?>
				</th>
				
				<th>
					<?php echo $this->partial('index/manage/header.phtml','admin',array('caption'=>$this->captions,'column'=>'warehouse_manage_user')); ?>
				</th>
				
				<th>
					<?php echo $this->partial('index/manage/header.phtml','admin',array('caption'=>$this->captions,'column'=>'warehouse_note')); ?>
				</th>
				
				<th width='80px'>
					<?php echo $this->partial('index/manage/header.phtml','admin',array('caption'=>$this->captions,'column'=>'warehouse_status')); ?>
				</th>
				<th width='80px'>
					Quản lý
				</th>
			</tr>
		</thead>
		<tbody>
		<?php if (count($this->paginator) > 0): $no=0; $flag="";?>
		<?php foreach ($this->paginator as $row): ?>
			<?php /*if($flag!=$row->warehouse_warehouse_group_code){$flag=$row->warehouse_warehouse_group_code;?>
			<tr>
				<td colspan='13' style='color:blue;font-weight: bold;text-transform: uppercase;'>
					<?php echo $flag." - ".$row->m_Array['warehouse_group_name']?>
				</td>
			</tr>
			<?php }*/?>		
			<tr class='row<?php echo ($no++)%2 ?>'>
				<?php echo $this->partial('index/manage/orderer.phtml', 'admin', array($row->warehouse_id, $row->warehouse_order)) ?>
				<?php echo $this->partial('index/manage/checkbox.phtml', 'admin', array($row->warehouse_id)) ?>
				<td class="is_code">
					<?php echo $row->warehouse_code ?>
				</td>
				<td>
					<?php echo $row->warehouse_name ?>
				</td>
				<td class='left'>
					<?php echo $row->warehouse_address; ?>
				</td>
				<td class='left'>
					<?php echo $row->warehouse_phone; ?>
				</td>
				<td class='right'>
					<?php echo $this->partial('index/format/float.phtml','admin',array($row->warehouse_area)); ?>
				</td>
				<td class='right'>
					<?php echo $this->partial('index/format/float.phtml','admin',array($row->warehouse_temperature)); ?>
				</td>
				<td class='left'>
					<?php echo $row->warehouse_contain; ?>
				</td>
				<td class='left'>
					<?php echo $row->m_Array['account_fullname']; ?>
				</td>
				<td class='left'>
					<?php echo $row->warehouse_note; ?>
				</td>
				<td class='center'>
					<?php echo $this->partial('index/manage/publish.phtml','admin', array($this->url(array('action' => 'publish')),$row->warehouse_status)); ?>	
				</td>
				<td class='center'>
					<?php echo $this->partial('index/manage/detail.phtml','admin', array($this->url(array('action' => 'detail','id'=>$row->warehouse_id)))); ?>				
					<?php echo $this->partial('index/manage/edit.phtml','admin', array($this->url(array('action' => 'update','id'=>$row->warehouse_id)))); ?>
					<?php echo $this->partial('index/manage/trash.phtml','admin', array($this->url(array('action' => 'delete')))); ?>	
				</td>
			</tr>
		<?php endforeach; ?>
		<?php endif; ?>
		</tbody>
		<tfoot>
			<tr>
				<td colspan='13'>
					<div class='container'>
						<?php echo $this->paginationControl($this->paginator) ?>
					</div>
				</td>
			</tr>
		</tfoot>
	</table>
	<!-- / -->

</form>
